package com.syaccp.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.syaccp.model.TMessage;
import com.syaccp.vo.TMessageVo;

import java.sql.SQLException;
import java.util.List;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author syaccp
 * @since 2023-07-15
 */
public interface TMessageService extends IService<TMessage> {
    PageInfo<TMessageVo> getMessagePageByReceiverId(Integer index, TMessageVo tMessageVo)throws SQLException;

    boolean delMessage(Integer id)throws SQLException;

    boolean delMessageReceiver(Integer message_id,Integer receiver_id)throws SQLException;

    PageInfo<TMessageVo> getNotRead(Integer index, TMessageVo tMessageVo)throws SQLException;

    boolean updateIsRead(TMessageVo tMessageVo)throws SQLException;

    List<TMessageVo> selectNotReadMessage(TMessageVo tMessageVo)throws SQLException;

    boolean allRead(TMessageVo tMessageVo)throws SQLException;

    int insert(TMessageVo tMessageVo);

    int insertMessageReceiver(TMessageVo tMessageVo)throws SQLException;
}
